Skip to content

fix(server-utils): Gate gen_ai.tool.definitions on dataCollection.genAI.inputs - #24088

Open
s1gr1d wants to merge 2 commits into
developfrom
sig/dc-genai-tool-definitions
Open

fix(server-utils): Gate gen_ai.tool.definitions on dataCollection.genAI.inputs#24088
s1gr1d wants to merge 2 commits into
developfrom
sig/dc-genai-tool-definitions

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 4, 2026

Copy link
Copy Markdown
Member

Spec 0.9.1 counts tool definitions as generative AI input data, next to system instructions and prompt messages. Only the Vercel AI integration treated them that way. OpenAI, Anthropic, Google GenAI, LangChain and LangGraph attached gen_ai.tool.definitions even with genAI.inputs: false, so a tool schema naming your internal endpoints still went out.

Each extractRequestAttributes now takes recordInputs and skips the attribute when it is off. An integration-level recordInputs still wins over the global option.

Fixes #24083

…genAI.inputs`

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d marked this pull request as ready for review September 4, 2026 12:11
@s1gr1d
s1gr1d requested a review from a team as a code owner September 4, 2026 12:11
@s1gr1d
s1gr1d requested review from stephanie-anderson and removed request for a team September 4, 2026 12:11
Comment thread packages/server-utils/src/ai/langgraph/index.ts
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.69 kB added added
@sentry/browser - with treeshaking flags 26.99 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 26.89 kB added added
@sentry/browser (incl. Tracing) 49.07 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 49.07 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.98 kB added added
@sentry/browser (incl. Tracing, Replay) 88.62 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.85 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 93.3 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 106.24 kB added added
@sentry/browser (incl. Feedback) 46.17 kB added added
@sentry/browser (incl. sendFeedback) 33.75 kB added added
@sentry/browser (incl. FeedbackAsync) 38.85 kB added added
@sentry/browser (incl. Metrics) 29.66 kB added added
@sentry/browser (incl. Logs) 29.94 kB added added
@sentry/browser (incl. Metrics & Logs) 30.59 kB added added
@sentry/react 30.45 kB added added
@sentry/react (incl. Tracing) 51.28 kB added added
@sentry/vue 35.91 kB added added
@sentry/vue (incl. Tracing) 51.34 kB added added
@sentry/svelte 28.71 kB added added
CDN Bundle 30.43 kB added added
CDN Bundle (incl. Tracing) 49.6 kB added added
CDN Bundle (incl. Logs, Metrics) 32.66 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.53 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.31 kB added added
CDN Bundle (incl. Tracing, Replay) 87.15 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.02 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 93.08 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.03 kB added added
CDN Bundle - uncompressed 90.13 kB added added
CDN Bundle (incl. Tracing) - uncompressed 147.81 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.52 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.59 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.82 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.44 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.21 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.15 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.9 kB added added
@sentry/nextjs (client) 53.89 kB added added
@sentry/sveltekit (client) 49.51 kB added added
@sentry/core/server 40.96 kB added added
@sentry/core/browser 13.53 kB added added
@sentry/node 124.78 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB added added
@sentry/node - without tracing 88.5 kB added added
@sentry/node - without channel injection 104.1 kB added added
@sentry/aws-serverless 96.87 kB added added
@sentry/cloudflare (withSentry) - minified 201.56 kB added added
@sentry/cloudflare (withSentry) 501.37 kB added added

View base workflow run

Resolve the recording options in `instrumentStateGraphCompile` too, so the
exported entry point keeps the `dataCollection` defaults.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d requested a review from a team as a code owner September 4, 2026 12:36
@s1gr1d
s1gr1d requested review from isaacs and mydea and removed request for a team September 4, 2026 12:36
Comment thread packages/server-utils/src/ai/langgraph/index.ts
@s1gr1d

s1gr1d commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@s1gr1d
s1gr1d removed the request for review from stephanie-anderson September 7, 2026 07:43

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d07536c. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dataCollection.genAI.inputs does not gate gen_ai.tool.definitions

1 participant